/// @description 步事件
// You can write your code in this editor

//处理surface释放问题
if(!surface_exists(view_surface))
{
	show_debug_message("surface丢失，重建中。。。");
	
	view_width = view_width>0?view_width:1;
	view_height = view_height>0?view_height:1;
	
	view_surface = surface_create(view_width, view_height);
}

//更新view大小
if(sprite_index)
{
	image_xscale = view_width/sprite_get_width(sprite_index);
	image_yscale = view_height/sprite_get_height(sprite_index);
}

//改变大小
if(view_width!=view_width_||view_height!=view_height_)
{
	show_debug_message("surface改变，重建中。。。");
	
	view_width_ = view_width;
	view_height_ = view_height;
	
	view_width = view_width>0?view_width:1;
	view_height = view_height>0?view_height:1;
	
	surface_resize(view_surface, view_width, view_height);
	event_user(view_event_id[VIEW_EVE.RESIZE]);
}

//鼠标按下事件
if(keyboard_check_pressed(mb_left))
{
	
}